<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set value="${ctx}" var = "ctx"/>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>MMLOO</title>
  <link rel="stylesheet" href="${ctx}/resources/plugins/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="${ctx}/resources/css/webuploader.css">
  <link rel="stylesheet" href="${ctx}/resources/plugins/image_css/global.css">
  <link rel="stylesheet" href="${ctx}/resources/css/global.css">

  <!--[if lt IE 9]>
  <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<jsp:include page="../../../home/navigator.jsp"></jsp:include>

<div class="content-title">购物返还商品列表
</div>
<div class="container"
     style="background-color:#DCEAF4; width:1600px; height:500px;border-radius: 0px 0px 0px 0px;">
  <div class="btn-group pull-right" style="margin-bottom:8px;">
    <a class="btn btn-lg btn-primary" href="${ctx}/manage/goods/promotion/returnBuy/add">
      <span class="glyphicon"></span> 添加购物返还商品
    </a>
  </div>
  <p></p>
  <div class="col-sm-5 col-sm-offset-1">
    <form id="searchForm" method="get" action="${ctx}/manage/goods/promotion/returnBuy/list"
          name="user">
      <div class="input-group">
        <input id="pageNo" name="pageNo" type="hidden" value="${pager.pageNo}"/>
        <input id="pageSize" name="pageSize" type="hidden" value="${pager.pageSize}"/>


      </div>
    </form>
  </div>
  <div class="main-content">

    <table class="table">
      <thead>
      <tr>
        <th>编号</th>
        <th>商品</th>
        <th>满额</th>
        <th>赠额</th>
        <th>开始时间</th>
        <th>结束时间</th>
        <th>参加团购的人数</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      <c:forEach items="${pager.list}" var="returnBuy">
        <%--<s:iterator value="#request.roleList" var="role">--%>
        <tr class="success">
          <td>${returnBuy.number}</td>
          <td>${returnBuy.goods_id}</td>
          <td>${returnBuy.ceilling_amount}</td>
          <td>${returnBuy.giving_amount}</td>
          <td>${returnBuy.start_time}</td>
          <td>${returnBuy.end_time}</td>
          <td>${returnBuy.person_count}</td>
          <td>
            <button onclick="editRole('<c:url value="${ctx}/manage/goods/promotion/returnBuy/get?id=${returnBuy.id}"/>')"
                    class="btn btn-primary btn-xs"
                    data-toggle="modal" data-target="#editRole">编辑
            </button>
            &nbsp;&nbsp;
            <button class="btn btn-primary btn-xs"
                    href="javascript:void(0)" data-toggle="tooltip" title="删除"
                    onclick="if (confirm('确认要删除本记录吗？此操作将不可恢复！'))
                            location = '<c:url
                            value="${ctx}/manage/goods/promotion/returnBuy/delete?id=${returnBuy.id}"/>';
                            return false;">删除
            </button>


          </td>
        </tr>
        <%--</s:iterator>--%>
      </c:forEach>

      </tbody>
    </table>
  </div>
  <div class="row">
    <div class="col-sm-12">
      ${pager}
    </div>
  </div>
</div>

<script src="${ctx}/resources/plugins/jquery-2.0.3.min.js"></script>
<script src="${ctx}/resources/plugins/bootstrap/js/bootstrap.js"></script>
<script src="${ctx}/resources/js/webuploader/webuploader.min.js"></script>
<script src="${ctx}/resources/js/jquery.masonry.min.js"></script>
<script src="${ctx}/resources/js/global.js"></script>
<script src="${ctx}/resources/js/manage.js"></script>
<script src="${ctx}/resources/plugins/image_global/global.js"></script>

</body>
</html>
